//
//  ShopModel.h
//  KingSelected
//
//  Created by 杨鹏 on 2023/10/29.
//

#import "BaseModel.h"

@class ShopModelImageModel,ShopModelFrame;

NS_ASSUME_NONNULL_BEGIN

@interface ShopModel : BaseModel

@property (nonatomic, copy) NSString *sellingPrice;
/// 是否售罄
@property (nonatomic, assign) BOOL close;

@property (nonatomic, assign) NSInteger createdAt;
/// 1 上架 0下架 
@property (nonatomic, assign) BOOL enabled;
@property (nonatomic, copy) NSString *goodsId;
@property (nonatomic, copy) NSString *goodsIntroduction;
@property (nonatomic, strong) NSArray *imgThumbnailUrl;
@property (nonatomic, strong) NSArray *imgUrl;
@property (nonatomic, copy) NSString *video;
@property (nonatomic, copy) NSString *videoPicUrl;

@property (nonatomic, copy) NSString *userId;
@property (nonatomic, copy) NSString *nickName;
@property (nonatomic, copy) NSString *avatar;
@property (nonatomic, copy) NSString *country;
@property (nonatomic, assign) BOOL follow;
@property (nonatomic, copy) NSString *parentUserName;
@property (nonatomic, copy) NSString *parentUserId;
/// 收藏
@property (nonatomic, assign) BOOL collect;
/// 置顶
@property (nonatomic, assign) BOOL top;
/// 是否是自己店铺
@property (nonatomic, assign) BOOL owner;
/// 是否转发过
@property (nonatomic, assign) BOOL trans;
/// 半自动 已转发的商品 是否有更新
@property (nonatomic, assign) BOOL hasUpdate;
/// 是否是查看自己
@property (nonatomic, assign) BOOL isSelf;

@property (nonatomic, strong) NSArray<ShopModelImageModel *> *imageModels;


@end


@interface ShopModelFrame : BaseModel

@property (nonatomic, strong) ShopModel *model;

/// 昵称
@property (nonatomic, assign) CGRect nameF;
/// 头像
@property (nonatomic, assign) CGRect iconF;
/// 时间
@property (nonatomic, assign) CGRect timeF;
/// 内容
@property (nonatomic, assign) CGRect contentF;
/// 九宫格
@property (nonatomic, assign) CGRect photosF;
/// 价格
@property (nonatomic, assign) CGRect priceF;
/// 分割线
@property (nonatomic, assign) CGRect lineF;
/// 宽度
@property (nonatomic, assign) CGFloat width;
/// cell 高
@property (nonatomic, assign) CGFloat cellHeight;

- (void)updateFrameWithWidth:(CGFloat)width;

@end

@interface ShopModelImageModel : BaseModel

@property (nonatomic, copy) NSString *imgThumbnailUrl;
@property (nonatomic, copy) NSString *imgUrl;
@property (nonatomic, copy) NSString *video;
@property (nonatomic, assign) BOOL isVideo;

@end

NS_ASSUME_NONNULL_END
